//
//  UIView+SuperController.m
//  xiaohu
//
//  Created by 刘璇 on 2017/11/8.
//  Copyright © 2017年 iOSOneGpowerMobile. All rights reserved.
//

#import "UIView+SuperController.h"

@implementation UIView (SuperController)

/** 获取当前View的控制器对象 */
-(UIViewController *)getCurrentViewController{
    UIResponder *next = [self nextResponder];
    do {
        if ([next isKindOfClass:[UIViewController class]]) {
            return (UIViewController *)next;
        }
        next = [next nextResponder];
    } while (next != nil);
    return nil;
}
-(void)addBottomCutLineWithFrame:(CGRect)frame{
    UIView * curLine = [[UIView alloc]init];
    curLine.frame = frame;
    curLine.backgroundColor = kHexColor(0xd9d9d9);
    [self addSubview:curLine];
}
@end
